package com.chap14.Util;

import sun.misc.Unsafe;

import java.lang.reflect.Field;

/**
 * <p>
 * <code>Utils</code>
 * </p>
 *
 * @author junbao3
 * TODO
 * @date 2023-04-13 8:56
 * Copyright (C) 2021 IFlyTek. All rights reserved.
 */
public class Utils {
    public static Unsafe getUnsafe() {
        try {
            Field theUnsafe = Unsafe.class.getDeclaredField("theUnsafe");
            theUnsafe.setAccessible(true);
            Unsafe unsafe = (Unsafe) theUnsafe.get(null);
            return unsafe;

        }catch (Exception e){

        }
        return null;
    }
}
